#include"test.pb.h"
#include<iostream>
#include<string>
using namespace fixbug;
int main()
{
   

   GetFriendListResponse flr;
   ResultCode * rs = flr.mutable_result();
   rs->set_errocode(0);
   User * user1 = flr.add_friendlist();
   user1->set_name("ikun");
   user1->set_age(20);
   user1->set_sex(User::MAN);
   std::cout<<flr.friendlist_size()<<std::endl;;
    return 0;
}
int main2()
{
   
   LoginRequest req;
    req.set_name("wl");
    req.set_pwd("123");
    std::string str;
    if(req.SerializeToString(&str))
    {
        std::cout<<str.c_str()<<std::endl;
    }
   LoginRequest req2;
    if(req2.ParseFromString(str))
    {
        std::cout<<req2.name()<<std::endl;
        std::cout<<req2.pwd()<<std::endl;
    }
}